package lab02.test02;

import java.util.Scanner;

public class Circle {

    double r;
    final double PI = 3.14;


    public double getR() {
        return r;
    }

    public void setR(double r) {
        this.r = r;
    }

    public double perimeter() {

        return PI * r * 2;
    }

    public double area() {

        return PI * r * r;
    }


    @Override
    public String toString() {
        return "面积：" + area() + "\n周长：" + perimeter();
    }
}
